<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        //用于判断字符是否在选定字符串首部或者尾部  返回true  false 布尔值
        // let str = 'Hello World!';
        // console.log(str.startsWith('He'));
        // console.log(str.endsWith('!'));
    </script>
</body>

</html>